package arrayUtils

type ArrayUtils struct{}

func (arrayUtils *ArrayUtils) Contains(arr interface{}, val interface{}) bool {
	switch arr.(type) {
	case []string:
		for _, v := range arr.([]string) {
			if v == val {
				return true
			}
		}

	case []int:
		for _, v := range arr.([]int) {
			if v == val {
				return true
			}
		}

	case []float64:
		for _, v := range arr.([]float64) {
			if v == val {
				return true
			}
		}
	}

	return false
}
